<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./template.js"></script>
</head>

<body>
    <h1 id="box"></h1>
    <script src="text/html" id="tpl-user">
        <h1>部落没有人---- {{cipher}} </h1>
    </script>
    <script>
        let data = {
            cipher: '酋长当神仙'
        }
        var htmlStr = template('tpl-user', data)
        document.getElementById('box').innerHTML = htmlStr
    </script>
</body>

</html>